package com.vinyl.android.chinese.activity;

import com.vinyl.android.chinese.R;
import com.vinyl.android.chinese.fragment.MainFragment;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
                
        ((Button)findViewById(R.id.Button01)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "food");
				startActivity(intent);
			}
		});        
        
        ((Button)findViewById(R.id.Button02)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "store");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button03)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "airport");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button04)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "hotel");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button05)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "traffic");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button06)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "dutyfree");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button07)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "train");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button08)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "street");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button09)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "bank");
				startActivity(intent);
			}
		});                
        
        ((Button)findViewById(R.id.Button10)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, MainFragment.class);
				intent.putExtra("category", "postoffice");
				startActivity(intent);
			}
		});                
    }
        
}
